package com.zuofei.springcloud.controller;


import com.zuofei.springcloud.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping(value = "/file")
public class FileController {
    @Autowired
    private FileService fileService;

    @PostMapping(value = "/do")
    public List<String> filedo() {
        List<String> filePahtList  = fileService.readFile("D:\\code\\spring-cloud\\jfvideo3-logs");
        return filePahtList;
    }
}
